﻿<%@ Page Language="C#"  EnableTheming="true"  Theme="asm" AutoEventWireup="true" MasterPageFile="~/common/pages/queryzer2.Master" CodeBehind="Fase.aspx.cs" Inherits="Com.AlbLab.CR.Web.pages.Fase" %>
<%@ Register src="../controls/PraticaViewerSmall.ascx" tagname="PraticaViewerSmall" tagprefix="uc1" %>
<%@ Register Assembly="AjaxControlToolkit, Version=1.0.20229.20821, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e"
    Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register src="../controls/Upload.ascx" tagname="Upload" tagprefix="uc2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContentPlaceHolder" runat="server">
    <asp:HiddenField ID="hidFaseId" runat="server" />
    <asp:HiddenField ID="hidPraticaId" runat="server" Value="<%# Entity.Fas_cod_pratica%>" />
    <asp:HiddenField ID="hidServiceId" runat="server" Value="<%# Entity.Fas_cod_servizio%>" />
    <asp:HiddenField ID="hidProgrFase" runat="server" Value="<%# Entity.Fas_Progr_Fase%>" />
    <asp:HiddenField ID="hidNumFase" runat="server" Value="<%# Entity.Fas_nro_fase%>" />
    <uc1:PraticaViewerSmall ID="PraticaViewerSmall1" runat="server" ShowDettagliLink="false" />
    <asp:Panel ID="pnlStatoFase" runat="server">
    <div class="header-panel-gray">
                    <div class="header-title">
                        <div class="header-text-left">
                            <label>Dettaglio Fase</label>
                            <asp:Button ID="btnPrevious" runat="server" Text="<" OnClick="btnNav_OnClick" CommandArgument="prev" Height="18px" width="18px"/>
                            <%# Entity.Fas_Progr_Fase%>
                            <asp:Button ID="btnNext" runat="server" Text=">" OnClick="btnNav_OnClick"  CommandArgument="next" Height="18px" width="18px"/>
                        </div>
                        <div class="header-text-right">
                            <asp:LinkButton ID="btnSaveDatiGenerali" runat="server" OnClick="btnSaveDatiGenerali_OnClick">Salva</asp:LinkButton>
                            <asp:LinkButton ID="btnCloseFase" runat="server" OnClick="btnCloseFase_OnClick">| Termina Fase</asp:LinkButton>
                            <asp:LinkButton ID="btnClosePrt" runat="server" OnClick="btnClosePrt_OnClick">| Termina Pratica</asp:LinkButton>
                        </div>
                    </div>
                </div>
    <div id="pnlStatoFaseDett" class="content-panel-gray">
    <table width="100%">
        <tr>
            <td class="lbl" style="width: 100px">FASE</td>
            <td><asp:Label ID="lblNomeFase" runat="server" Text="<%# Entity.Fas_des_fase %>" SkinID="lrb8"></asp:Label></td>
            <td class="lbl" style="width: 200px">CREATA IL</td>
            <td><asp:Label ID="lblDataCreazione" runat="server" Text="<%# Entity.Fas_Dt_Arrivo %>" SkinID="lrb8"></asp:Label></td>
        </tr>
        <tr>
            <td class="lbl" style="width: 1px">U.O.</td>
            <td><asp:Label ID="lblUo" runat="server" Text="<%# Entity.Fas_Unit_Oper %>" SkinID="lrb8"></asp:Label></td>
            <td class="lbl" style="width: 1px">PRESA IN CARICO IL</td>
            <td><asp:Label ID="lblDataPresaInCarico" runat="server" Text="<%# Entity.Fas_Dt_Inilav %>" SkinID="lrb8"></asp:Label></td>
        </tr>
        <tr>
            <td class="lbl" style="width: 1px">STATO</td>
            <td><asp:DropDownList ID="ddlStato" Width="400px" runat="server" OnDataBinding="ddlStato_DataBind"></asp:DropDownList></td>
            <td class="lbl" style="width: 1px">CHIUSA IL</td>
            <td><asp:Label ID="lblDataChiusura"  runat="server" SkinID="lrb8" Text="<%# Entity.Fas_Dt_Finelav %>"></asp:Label></td>
        </tr>
        <tr>
            <td class="lbl" style="width: 1px">NOTE</td>
            <td colspan="3">
                <asp:TextBox ID="tbNote" runat="server" Rows="3" Text="<%# Entity.Fas_Note %>" Width="400px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="lbl" style="width: 1px"><asp:Label ID="lblMotivoChiusural" runat="server" value=""></asp:Label></td>
            <td colspan="3">
                <asp:Label ID="lblMotivoChiusura" runat="server" Rows="3" Text="<%# decodeMotivoChiusura() %>" SkinID="lrb8" ></asp:Label>
            </td>
        </tr>
    </table>
  
    </div>

    </asp:Panel>
        <asp:Panel ID="pnlFaseSuccessiva" runat="server">
    <div class="header-panel-gray">
                    <div class="header-title">
                        <div class="header-text-left">
                            <label>Fase Successiva</label>
                        </div>
                        <div class="header-text-right">
                        <asp:LinkButton ID="btnChiudiFase" runat="server" OnClick="btnInitFase_OnClick">Inizializza Fase</asp:LinkButton>
                       
                        </div>
                    </div>
                </div>
    <div id="pnlChiusuraDett" class="content-panel-gray">
    <table width="100%">
        <tr>
	    <td class="lbl" style="width: 150px">MOTIVO CHIUSURA</td>
	    <td colspan="3"><asp:DropDownList ID="ddlEndFase" runat="server"></asp:DropDownList></td>
        </tr>
        <tr>
        <td class="lbl" style="width: 100px">FASE SUCCESSIVA</td>
            <td><asp:DropDownList ID="ddlUo" runat="server">
            <asp:ListItem Text="UFFICIO COMMERCIALE" Value="UFFICIO COMMERCIALE"></asp:ListItem>
            <asp:ListItem Text="UFFICIO TECNICO" Value="UFFICIO TECNICO"></asp:ListItem>
            </asp:DropDownList></td>
        <td colspan="2"><asp:DropDownList ID="ddlNextFase" runat="server" OnDataBinding="ddlNextFase_DataBind" /></td>
        </tr>
        <tr>
        <td class="lbl"  style="width: 150px">NOTE</td>
        <td colspan="3">
        <asp:TextBox ID="tbNewNote" runat="server" Width="400px" Rows="4"></asp:TextBox>
        </td>
        </tr>
    </table>
    </div>
    </asp:Panel>

    <!--dati fase-->
    <table width="100%" cellpadding=0 cellspacing=0 >
    <tr>
    <td>
     <asp:Panel ID="pnlDatiAppuntamento" runat="server">
    <div class="header-panel-gray">
                    <div class="header-title">
                        <div class="header-text-left">
                            <label>Appuntamento</label>
                        </div>
                        <div class="header-text-right">
                        <asp:LinkButton ID="btnSaveAppuntamento" runat="server" OnClick="btnSaveAppuntamento_OnClick">Salva</asp:LinkButton>
                       
                        </div>
                    </div>
                </div>
    <div id="pnlDatiAppuntamentoDett" class="content-panel-gray" style="height:80px">
    <table width="100%">
        <tr>
            <td class="lbl" style="width: 100px">PROPOSTA UTENTE</td>
            <td><asp:TextBox ID="tbDataAppUte" runat="server" Text="<%# getDate(Entity.Fas_Dtora_App_Procli) %>" ></asp:TextBox>
                <cc1:CalendarExtender ID="tbDataAppUte_CalExt" TargetControlID="tbDataAppUte" runat="server"  />
	            <asp:DropDownList ID="ddl_OraAppUte" runat="server" SelectedValue="<%# getOra(Entity.Fas_Dtora_App_Procli) %>"><asp:ListItem Text="" Value="00"/><asp:ListItem Text="07" Value="07"/><asp:ListItem Text="08" Value="08"/><asp:ListItem Text="09" Value="09"/><asp:ListItem Text="10" Value="10"/><asp:ListItem Text="11" Value="11"/><asp:ListItem Text="12" Value="12"/><asp:ListItem Text="13" Value="13"/><asp:ListItem Text="14" Value="14"/><asp:ListItem Text="08" Value="08"/><asp:ListItem Text="15" Value="15"/><asp:ListItem Text="16" Value="16"/><asp:ListItem Text="17" Value="17"/><asp:ListItem Text="18" Value="18"/><asp:ListItem Text="19" Value="19"/><asp:ListItem Text="20" Value="20"/></asp:DropDownList>
                <asp:DropDownList ID="ddl_MinAppUte" runat="server" SelectedValue="<%# getMinuto(Entity.Fas_Dtora_App_Procli) %>"><asp:ListItem Text="" Value="00"/><asp:ListItem Text="00" Value="00"/><asp:ListItem Text="15" Value="15"/><asp:ListItem Text="30" Value="30"/><asp:ListItem Text="45" Value="45"/></asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td class="lbl" style="width: 1px">PROPOSTA ASM</td>
	        <td><asp:TextBox ID="tbDataAppAsm" runat="server" Text="<%# getDate(Entity.Fas_Dtora_App_Proasm) %>"></asp:TextBox>
	        <cc1:CalendarExtender ID="tbDataAppAsm_CalExt" TargetControlID="tbDataAppAsm" runat="server"  />
	        <asp:DropDownList ID="ddl_OraAppAsm" runat="server" SelectedValue="<%# getOra(Entity.Fas_Dtora_App_Proasm) %>"><asp:ListItem Text="" Value="00"/><asp:ListItem Text="07" Value="07"/><asp:ListItem Text="08" Value="08"/><asp:ListItem Text="09" Value="09"/><asp:ListItem Text="10" Value="10"/><asp:ListItem Text="11" Value="11"/><asp:ListItem Text="12" Value="12"/><asp:ListItem Text="13" Value="13"/><asp:ListItem Text="14" Value="14"/><asp:ListItem Text="08" Value="08"/><asp:ListItem Text="15" Value="15"/><asp:ListItem Text="16" Value="16"/><asp:ListItem Text="17" Value="17"/><asp:ListItem Text="18" Value="18"/><asp:ListItem Text="19" Value="19"/><asp:ListItem Text="20" Value="20"/></asp:DropDownList>
            <asp:DropDownList ID="ddl_MinAppAsm" runat="server" SelectedValue="<%# getMinuto(Entity.Fas_Dtora_App_Proasm) %>"><asp:ListItem Text="" Value="00"/><asp:ListItem Text="00" Value="00"/><asp:ListItem Text="15" Value="15"/><asp:ListItem Text="30" Value="30"/><asp:ListItem Text="45" Value="45"/></asp:DropDownList></td>
        </tr>
        <tr>
            <td class="lbl" style="width: 1px">DATA EFF.</td>
	        <td>
	            <asp:TextBox ID="tbDataAppEff" runat="server" Text="<%# getDate(Entity.Fas_Dtora_App) %>"></asp:TextBox>
	            <cc1:CalendarExtender ID="tbDataAppEff_CalExt" TargetControlID="tbDataAppEff" runat="server"  />
	            <asp:DropDownList ID="ddl_OraAppEff" runat="server" SelectedValue="<%# getOra(Entity.Fas_Dtora_App) %>"><asp:ListItem Text="" Value="00"/><asp:ListItem Text="07" Value="07"/><asp:ListItem Text="08" Value="08"/><asp:ListItem Text="09" Value="09"/><asp:ListItem Text="10" Value="10"/><asp:ListItem Text="11" Value="11"/><asp:ListItem Text="12" Value="12"/><asp:ListItem Text="13" Value="13"/><asp:ListItem Text="14" Value="14"/><asp:ListItem Text="08" Value="08"/><asp:ListItem Text="15" Value="15"/><asp:ListItem Text="16" Value="16"/><asp:ListItem Text="17" Value="17"/><asp:ListItem Text="18" Value="18"/><asp:ListItem Text="19" Value="19"/><asp:ListItem Text="20" Value="20"/></asp:DropDownList>
                <asp:DropDownList ID="ddl_MinAppEff" runat="server" SelectedValue="<%# getMinuto(Entity.Fas_Dtora_App) %>"><asp:ListItem Text="" Value="00"/><asp:ListItem Text="00" Value="00"/><asp:ListItem Text="15" Value="15"/><asp:ListItem Text="30" Value="30"/><asp:ListItem Text="45" Value="45"/></asp:DropDownList>
            </td>
        </tr>
    </table>
    </div>
    </asp:Panel>
    </td>
    <td style="width:5px"></td>
    <td>
    <asp:Panel ID="pnlRichiestaDoc" runat="server">
    <div class="header-panel-gray">
                    <div class="header-title">
                        <div class="header-text-left">
                            <label>Richiesta Documentazione</label>
                        </div>
                        <div class="header-text-right">
                        <asp:LinkButton ID="btnSaveDocumentazione" runat="server" OnClick="btnSaveDocumentazione_OnClick">Salva</asp:LinkButton>
                       
                        </div>
                    </div>
                </div>
    <div id="pnlRichiestaDocDett" class="content-panel-gray" style="height:80px">
    <table width="100%">
        <tr>
            <td class="lbl" style="width: 100px">DATA RICHIESTA</td>
            <td><asp:TextBox ID="tbDataDocRic" runat="server" Text="<%# getDate(Entity.Fas_Dt_Atto_Rich) %>" ></asp:TextBox>
                <cc1:CalendarExtender ID="tbDataDocRic_CalExt" TargetControlID="tbDataDocRic" runat="server"  />
	        </td>
        </tr>
        <tr>
            <td class="lbl" style="width: 1px">DATA RISPOSTA</td>
	    <td><asp:TextBox ID="tbDataDocResp" runat="server" Text="<%# getDate(Entity.Fas_Dt_Atto_Ott) %>" ></asp:TextBox>
	        <cc1:CalendarExtender ID="tbDataDocResp_CalExt" TargetControlID="tbDataDocResp" runat="server"  />
	    </td>
        </tr>
    </table>
    </div>
    </asp:Panel>
    </td>
    </tr>
    </table>
    <asp:Panel ID="pnlSospensione" runat="server">
    <div class="header-panel-gray">
                    <div class="header-title">
                        <div class="header-text-left">
                            <label>Sospensione Pratica</label>
                        </div>
                        <div class="header-text-right">
                            <asp:LinkButton ID="btnSaveSospensione" runat="server" OnClick="btnSaveSospensione_OnClick">Salva</asp:LinkButton>
                        </div>
                    </div>
                </div>
    <div id="pnlSospensioneDett" class="content-panel-gray">
    <table width="100%">
        <tr>
            <td class="lbl" style="width: 150px">DATA SOSPENSIONE</td>
            <td><asp:TextBox ID="tbDataInitSosp" runat="server" Text="<%# getDate(Entity.Fas_Dt_Inisosp) %>" ></asp:TextBox>
                 <cc1:CalendarExtender ID="tbDataInitSosp_CalExt" TargetControlID="tbDataInitSosp" runat="server"  />
        DATA RIATTIVAZIONE
	    <asp:TextBox ID="tbDataEndSosp" runat="server" Text="<%# getDate(Entity.Fas_Dt_Finesosp) %>" ></asp:TextBox>
	         <cc1:CalendarExtender ID="tbDataEndSosp_CalExt" TargetControlID="tbDataEndSosp" runat="server"  />
	    </td>
        </tr>
        <tr>
            <td class="lbl" style="width: 1px">MOTIVO</td>
	    <td><asp:DropDownList ID="ddlMotivoSosp" runat="server"></asp:DropDownList></td>
        </tr>
    </table>
    </div>
    </asp:Panel>
    <uc2:Upload ID="Upload1" runat="server" OnActions="Upload1_OnActions" />
</asp:Content>